//
//  DDDInterstitialListVC.m
//  DemoPod
//
//  Created by mu on 2020/9/22.
//  Copyright © 2020 Yujun Liang. All rights reserved.
//

#import "DDDInterstitialListVC.h"
#import "DDDExpressInterstitialVC.h"

@interface DDDInterstitialListVC ()<UITableViewDelegate,UITableViewDataSource>

@property (weak, nonatomic) IBOutlet UITableView *mainTableView;
@property (nonatomic, strong) NSMutableArray *dataAry;
@end

@implementation DDDInterstitialListVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"插屏列表";
    self.dataAry = [NSMutableArray arrayWithArray:@[@"1:1",@"3:2",@"2:3",@"横版插屏",@"横/竖版插屏",@"全屏插屏-视频"]];
    [self.mainTableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"UITableViewCell"];
}

#pragma mark-- UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

    DDDExpressInterstitialVC *vc = [[DDDExpressInterstitialVC alloc]init];
    vc.type = indexPath.row;
    [self.navigationController pushViewController:vc animated:YES];
    
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return  50.0;
}
#pragma mark-- UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.dataAry.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *indentifier = @"UITableViewCell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:indentifier forIndexPath:indexPath];
    if (!cell) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:indentifier];
    }
    cell.textLabel.text = self.dataAry[indexPath.row];
    return cell;
}

@end
